package com.xidian.zhiancloud.controller.luling.systemconfiguration;
import com.xidian.zhiancloud.dto.ResultDTO;
import com.xidian.zhiancloud.enums.GeneralResponseEnums;
import com.xidian.zhiancloud.model.RiskPointTypeStatus;
import com.xidian.zhiancloud.model.WarSignCategoryStatus;
import com.xidian.zhiancloud.service.luling.systemconfiguration.RiskPointTypeStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
 *风险点类型接口
 * @Author:luling
 * @Date:2021/1/7   15:24
 */
@RestController
@RequestMapping("/RiskPointTypeStatus")
public class RiskPointTypeStatusController {
@Autowired
    private RiskPointTypeStatusService  riskPointTypeStatusService;
    /**
     *添加风险点类型信息
     @param   riskPointTypeStatus 风险点类型对象
     @return ResultDTO 对象
     */
    @PostMapping("/insert")
public ResultDTO<Boolean> insert(@RequestBody RiskPointTypeStatus riskPointTypeStatus) {
    riskPointTypeStatusService.insert(riskPointTypeStatus);
    return ResultDTO.successOf(GeneralResponseEnums.SUCCESS);
}
    /**
     *删除风险点类型信息
     @param   riskPointTypeStatus 风险点类型对象
     @return ResultDTO 对象
     */
    @PostMapping("/delete")
    public ResultDTO<Boolean> delete(@RequestBody RiskPointTypeStatus riskPointTypeStatus) {
        riskPointTypeStatusService.delete(riskPointTypeStatus);
        return ResultDTO.successOf(GeneralResponseEnums.SUCCESS);
    }
    /**
     *修改风险点类型信息
     @param   riskPointTypeStatus 风险点类型对象
     @return ResultDTO 对象
     */
    @PostMapping("/update")
    public ResultDTO<Boolean> update(@RequestBody RiskPointTypeStatus riskPointTypeStatus) {
        riskPointTypeStatusService.update(riskPointTypeStatus);
        return ResultDTO.successOf(GeneralResponseEnums.SUCCESS);
    }
    /**
     * 根据id删除风险点类型信息
     *
     * @param ids ids数组
     * @return  返回ResultDTO对象*/
    @DeleteMapping("/deleteByIds")
    public ResultDTO<Object> deleteByIds(Long[] ids) {
        riskPointTypeStatusService.deleteByIds(ids);
        return ResultDTO.successOf(GeneralResponseEnums.SUCCESS);
    }
}
